home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / cistlx.arc / CIS.SLT < prev    next >
Text File  |  1990-08-30  |  2KB  |  72 lines

  1. ///////////////////////////////  CIS.SLT  ////////////////////////////////////
  2.  
  3. // This is a SALT Script for logging on to CIS.
  4. //         Compu-Serve B is turned on and off automatically.
  5. //  This is quite a modification of the original version from Telix.
  6. //  The important chaage is the addition of an infinite loop to
  7. //  interogate the carrier detect status and to break out
  8. //  and turn off Compu-Serve B after the session is completed..
  9. //   If CompuServe B is left on as a terminal option in other services
  10. //   any ASCII 16 value will cause telix to crash.
  11. //
  12. //   **********************************
  13. //   *  Rewritten by Dan Berky        *
  14. //   *  Westville, NJ  08093          *
  15. //   *  Donated to the Public Domain  *
  16. //   *  (C) 30 Aug. 1990              *
  17. //   **********************************
  18. //
  19. str user_id[] = "71510,1041";
  20.  
  21. // Put your CIS account in the above line.
  22. // The script will get the proper password
  23. // from the dialing directory (Telix puts that password in the script system
  24. // variable called _entry_pass).
  25.  
  26. // Put your user id and password in the above lines instead of the 'x's
  27. // Before using this script for the first time, or when you make a change,
  28. // type 'cs cis' at the DOS prompt to compile the script for use by Telix.
  29.  
  30. //////////////////////////////////////////////////////////////////////////////
  31.  
  32. main()
  33.  
  34. {
  35.  int n = 0;
  36.  _cisb_auto=1;
  37.  transtab("CLEAR.XLT");
  38.  alarm (1);
  39.  
  40.  while (n < 5)      // loop up to 5 times to send the Ctrl-C
  41.   {
  42.    delay (25);
  43.    cputc ('^C');
  44.  
  45.    if (waitfor ("User ID:", 7))
  46.     break;
  47.   }
  48.  
  49.  if (n >= 5)
  50.   {
  51.    hangup ();
  52.    return;
  53.   }
  54.  
  55.  cputs(user_id);                  // send user id
  56.  cputs ("^M");                    //   and Carriage Return
  57.  
  58.  waitfor ("Password:", 15);
  59.  cputs (_entry_pass);             // send password
  60.  cputs ("^M");                    //   and Carriage Return
  61.        While (1)
  62.        {
  63.         terminal ( );
  64.                   if (carrier()==0)
  65.                   {
  66.                    transtab("TELIX.XLT");
  67.                     _cisb_auto=0;
  68.                   break;
  69.                   }
  70.                   }
  71. }
  72.